package com.open.capacity.task.dao;

import com.open.capacity.task.model.TaskComment;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CommentDao {
    List<TaskComment> findComment(Map<String,Object> params);

    int add(TaskComment taskComment);

    int delete(@Param("id") String id);

    String findUserById(@Param("id") String id);

    List<TaskComment> findCommentById(Map<String, Object> params);

    List<TaskComment> findSubCommentById(@Param("id") Integer id);

    int getLikeCountByCmtId(@Param("id") Integer id);

    int judgeLike(@Param("userId") String userId,@Param("cId") Integer cId);

    int cancel(@Param("cId") Integer cId);

    int giveLike(@Param("cId")Integer cId);

    void addUserLikeComment(@Param("userId") String userId,@Param("cId") Integer cId);

    void delUserCommentRelation(@Param("userId") String userId,@Param("cId") Integer cId);
}
